function N = CountSignChanges( a )
N = 0;
a = double(a);
for i = 1 : size(a, 2) - 1
    if sign(a(i)) ~= sign(a(i + 1))
        N = N + 1;
    end;
end;
end

